package com.wing.purchase.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wing.purchase.model.entity.WarehouseShelfSpace;
import com.wing.purchase.model.response.WarehouseShelfSpaceVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 仓库货架货位-Dao
 *
 * @author
 */
@Mapper
public interface WarehouseShelfSpaceDao extends BaseMapper<WarehouseShelfSpace> {

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<WarehouseShelfSpaceVO> list4app(@Param("params") Map<String, Object> params);

    /**
     * 分页列表-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    List<WarehouseShelfSpaceVO> list4app(@Param("page") Page<WarehouseShelfSpaceVO> page, @Param("params") Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    WarehouseShelfSpaceVO get4appById(Long id);

    int disableByShelfId(@Param("shelfId") Long shelfId);

    int updateShelfSpaceById(WarehouseShelfSpace warehouseShelfSpace);

    WarehouseShelfSpaceVO findByCode(String code);

    /**
     * 查询采购入库产品库位
     * @param skuCode
     * @param warehouseId
     * @return
     */
    List<WarehouseShelfSpaceVO> getShelfSpace(@Param("skuCode") String skuCode, @Param("warehouseId") Long warehouseId);
}
